package cn.ninthquestion.依赖关系;

public class Student {
    public String name;
    public int id;
    public Classes classes;

    public Student(){

    }

    public Student(String name, int id, Classes classes) {
        this.name = name;
        this.id = id;
        this.classes = classes;
    }

    public void  show(){
        System.out.println(name+"的学号是"+id+"他是"+classes.id+"班的学生,他们班叫"+classes.name);
    }
}
